$(document).ready(function(){
    var addOrder = function () { $("iframe").attr("src","addOrder.html") },
        letterReceive = function () {$("iframe").attr("src","letterReceive.html")},
        packageReceive = function () {$("iframe").attr("src","packageReceive.html")},
        orderInquire = function () {$("iframe").attr("src","orderInquire.html")},
        sendOrder = function () {$("iframe").attr("src","sendOrder.html")},
        orderReturn = function () {$("iframe").attr("src","orderReturn.html")},
        distributePackage = function () {$("iframe").attr("src","distributePackage.html")},
        announce = function () {$("iframe").attr("src","announce.html")},
        inquireStaInfo = function () {$("iframe").attr("src","inquireStaInfo.html")},
        orderInquireForMasterSta= function () {$("iframe").attr("src","masterStationOrderInquire.html")},
        packageInquire = function () {$("iframe").attr("src","packageInquire.html")},
        unusualOrder = function () {$("iframe").attr("src","unusualOrder.html")},
        localCityOrderInquire = function () {$("iframe").attr("src","localCityOrderInquire.html")},
        siteManage = function () {$("iframe").attr("src","siteManage.html")},
        addrManage = function () {$("iframe").attr("src","addrManage.html")},
        busstationManage = function () {$("iframe").attr("src","busstationManage.html")},
        vipAddOrder = function () {$("iframe").attr("src","vipAddOrder.html")},
        vipOrderInquire = function () {$("iframe").attr("src","vipOrderInquire.html")},
        allroutes = function() {
            var route = window.location.hash.slice(2)
        };

    var routes = {
        '/transfer_station/add_order': addOrder,
        '/transfer_station/letterreceive':letterReceive,
        '/transfer_station/packagereceive':packageReceive,
        '/transfer_station/sendorder':sendOrder,
        '/transfer_station/orderinquire':orderInquire,
        '/sub_station/add_order':addOrder,
        '/sub_station/packagereceive':packageReceive,
        '/sub_station/orderinquire':orderInquire,
        '/sub_station/sendorder':sendOrder,
        '/sub_station/orderreturn':orderReturn,
        '/master_station/distributepackage':distributePackage,
        '/master_station/announce':announce,
        '/master_station/inquirestainfo':inquireStaInfo,
        '/master_station/orderinquire':orderInquireForMasterSta,
        '/master_station/packageinquire':packageInquire,
        '/master_station/unusualorder':unusualOrder,
        '/localcity_master_station/localcityletterreceive':letterReceive,
        '/localcity_master_station/localcitysendorder':sendOrder,
        '/localcity_master_station/localcityinquireorder':localCityOrderInquire,
        '/admin/sitemanage':siteManage,
        '/admin/addrmanage':addrManage,
        '/admin/busstationmanage':busstationManage,
        '/vip/add_order':vipAddOrder,
        '/vip/inquireorder':vipOrderInquire,
    };

    var router = Router(routes);

    router.configure({
        on: allroutes
    });
    router.init();
});